<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>v-model</title>
</head>

<body>
    <div id="app">
        <input id="male" type="radio" v-model="gender" :value="genderVal[0]">
        <label for="male">男</label>
        <br>
        <input id="female" type="radio" v-model="gender" :value="genderVal[1]">
        <label for="female">女</label>
        <br>
        <span>性别：{{gender}}</span>
    </div>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/3.0.2/vue.global.prod.js"></script>
    <script>
        const vm = Vue.createApp({
            data() {
                return {
                    gender: '',
                    genderVal: ['男', '女']
                }
            }
        }).mount(' #app');
    </script>
</body>

</html>